<html>
<head>
    <title>403未授权</title>
    <style type="text/css" rel="stylesheet">
        #result {
            width: 400px;
            margin: 20px auto;
            border: 1px #ddd dashed;
            background: #90bc7f;
            border-radius: 5px;
            line-height: 30px;
            padding: 0;
            color: #fff
        }

        #result p {
            padding-bottom: 0;
            margin: 0 auto;
            width: 200px
        }

        #result p:before {
            content: '●';
            margin-right: 5px
        }

        #result h4 {
            text-align: center
        }

        #result .t {
            text-align: center
        }

        .error {
            background: #af5255 !important
        }
    </style>
</head>

<body class="page-main">
<div id="result" class="error" data-back="{:\\think\\Url::build('Pub/login')}">
    <h4>操作状态</h4>
    <p>{$error}</p>
    <div class="t">5秒后自动跳转</div>
</div>
<script type="text/javascript" src="__LIB__/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript">
    $(function(){
        var timer = setInterval(timer,1000);
        var sec = 5;
        var back = $('#result').attr('data-back');
        var status = $('#result').hasClass('error')?false:true;
        $('.t').click(function(){
            jump();
        })
        function timer(){
            sec--;
            $('.t').text(sec+'秒后自动跳转');
            if(sec==0) jump();
        }

        function jump(){
            clearInterval(timer);
            if(back!=''){
                if(top.location!=self.location){
                    parent.location.reload();
                    window.location.href = back;
                }else{
                    window.location.href = back;
                }
                //window.location.reload();
            }else{
                window.history.go(-1);
            }
        }


    });
</script>
</body>
</html>